<template>
  <div class="postsContent">
    <div v-for="data in dataList" :key="data.id">
      <h1>{{ data.title }}</h1>
      <div class="post-info">
        <span
          >攻略: {{ $moment(data.created_at).format("YYYY-MM-DD HH:MM") }}</span
        >
        <span>阅读：{{ data.watch || 0 }}</span>
      </div>
      <div class="post-content" v-html="data.content"></div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["dataList"],
  data() {
    return {
      date: ""
    };
  }
};
</script>

<style lang="less" scoped>
.postsContent {
  h1 {
    padding: 20px 10px;
    font-size: 31px;
    border-bottom: 1px solid #ccc;
  }
  .post-info {
    text-align: right;
    margin: 15px 0;
    span {
      margin-right: 20px;
      color: #999;
    }
  }
  .post-content {
    /deep/ img {
      max-width: 700px;
    }
  }
}
</style>
